var categoryId = GetQueryString('categoryId'),
	detailsUrl = '/jiadianweixiu/v1/category/'+categoryId,
	cityId = GetQueryString('cityId');
	

getDetailsData();console.log(cityId)
//通过id获取具体服务详情--------
	function getDetailsData(){
		var cusUrl = locationUrl + detailsUrl;
		var sendData = {
			channel : Channel,
			cityId : cityId
		};
		var type = 'GET' ;
		var opts = {
			'noMsg': true,
			success:function(data){
				console.log(data);
				var data = data.data;
//				getMain(data);
				var pic_lStr='',main_cStr = '',main_noteStr = '',main_rStr = '';
				//详情图片
				$('.detailsMain_l').html('');
				pic_lStr = '<div class="detailsMain_Lpic"><img src=" '+data.categoryIcon+' " alt="" /></div>';
				$('.detailsMain_l').append(pic_lStr);
				//详情价格
				$('.detailsMain_cTitle').html(data.categoryName);
				$('.priceSpan').html(data.price);
				for(var k = 0;k<data.note.length;k++){
					main_noteStr += '<li>'+data.note[k]+'</li>'
				}
				$('.detailsPromise_r').append(main_noteStr)
				main_cStr = '<div class="detailsBtn" categoryId ="'+data.categoryId+'">立即预约</div>';
				$('.detailsMain_cm').append(main_cStr);
				//详情介绍
				$('.rMain_u1').html('');
//				for(var i = 0;i<data.introduction.length;i++){
//					main_rStr += '<li>'+data.introduction[i]+'</li>'
//				};
				main_rStr += '<li>'+data.introduction+'</li>'
				$('.rMain_u1').append(main_rStr);
				$('.rMain_u2 img').attr('src',data.serviceDescription);
				$('.rMain_u3 img').attr('src',data.flow);
				$('.bg_wrap').show();
			}
		};
		KJin.ajax(cusUrl, sendData, opts,type);
	}

//点击立即预定跳转到订单页面-----
$('.detailsMain_cm').on('click','.detailsBtn',function(){
	var categoryId = $(this).attr('categoryId');
	window.location.href = 'order.html?categoryId='+categoryId+'&cityId='+cityId;
})
